package cn.silver.module.system.service.impl;

import cn.silver.framework.mybatis.service.impl.BaseServiceImpl;
import cn.silver.module.system.domain.SysSocial;
import cn.silver.module.system.mapper.SysSocialMapper;
import cn.silver.module.system.bean.SocialBean;
import cn.silver.module.system.param.SocialParam;
import cn.silver.module.system.service.ISysSocialService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 社会化关系Service业务层处理
 *
 * @author thiszhc
 * @date 2023-06-12
 */
@Service
@RequiredArgsConstructor
public class SysSocialServiceImpl extends BaseServiceImpl<SysSocialMapper, SysSocial, SocialParam, SocialBean> implements ISysSocialService {

    /**
     * 根据 authId 查询用户信息
     *
     * @param authId 认证id
     * @return 授权信息
     */
    @Override
    public SocialBean selectByAuthId(String authId) {
        return baseMapper.selectVoOne(new LambdaQueryWrapper<SysSocial>().eq(SysSocial::getAuthId, authId));
    }

}
